home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98b.txt
/
000061_icon-group-sender _Wed Jun 3 08:17:46 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
4KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id IAA00846
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 3 Jun 1998 08:17:46 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA09051; Wed, 3 Jun 1998 08:17:39 -0700
Message-Id: <s5751c70.061@housmtp.oceaneering.com>
X-Mailer: Novell GroupWise 4.1
Date: Wed, 03 Jun 1998 09:49:31 -0500
From: Charles Hethcoat <CHETHCOA@oss.oceaneering.com>
To: icon-group@optima.CS.Arizona.EDU
Subject: Retrieving directory contents -Reply
Mime-Version: 1.0
Content-Type: text/plain
Content-Disposition: inline
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 2707
"Richard A. O'Keefe" <ok@atlas.otago.ac.nz> said:
|Richard> A directory-with-file-attributes is NOT
a sequence of text
|Richard> lines; it is NOT a sequence, and its
elements are NOT lines of
|Richard> text.
>>> Paul Abrahams <abrahams@acm.org> 1998 Jun 01,
09:45pm >>> said:
>What I care about more
>than anything else is seeing *some*
>system-independent method of
>retrieving the names of the files in a given
>directory.
I think each of these gentlemen makes good points.
File and directory names are a problem, but a
bigger problem is the one of locating stuff (host
machines, servers, users, files, and devices like
printers) in general.
Where I work, we run PCs with Windows of various
flavors, Netware with NDS and bindery emulation,
and NT network with its means of naming things.
We also have TCP/IP and its addressing methods.
In addition, I run Linux. Accessing all this from
an Icon program isn't very easy. I haven't
figured out a good and reasonably universal
answer, and it sounds like a lot of people have
the same problem.
Leaving aside a moment the question of what is a
good way to represent these directories in Icon, I
think the fundamentally correct answer is to find
a consistent, publically available programming
interface to all of these file and directory
systems that were designed by different parties at
different times for different reasons.
So I would ask the Icon group to think about how
all these system naming collisions and conflicts
might be reconciled in a sensible way--so that
programs that access them can work no matter what
system they run on, and in a vendor-independent
manner. (Netware and Microsoft, maybe others, are
competing to define "the" correct way of doing it,
but who knows whose ox is being gored in the
process?)
I think Linux already has a good answer. Its
/proc "virtual filesystem" is a clean and
undemanding way to put system-dependent
information up for programmers (meaning their
programs) to access. The kernel's internal data
certainly isn't all string-based, but /proc makes
it look that way. It is easy for a relatively
unsophisticated programmer to understand what is
being offered and to access it without having to
know how the internals work. No language changes
are required to do this; just a one-time hack to
link this hypothetical /proc-like API into the
Icon interpreter and you have it. Then all you
have to do in your Icon program is open the
appropriate /proc subdirectory and read it using
the existing facilities in the language.
The question is, can the Icon community come up
with this API once for every platform? (Linux
source is available as a model.)
Charles Hethcoat
chethcoa@oss.oceaneering.com